#ifndef _APP_MAIN_H
#define _APP_MAIN_H            
#include <std.h>
#include <que.h>
#include <scom.h>

#if _NTSC  

#define VIDEO_FORMAT    NTSC
#define VIDEO_RES       RES_NTSC_FULL
#define FRM_WIDTH       720
#define FRM_HEIGHT      576
#define IMG_WIDTH       720
#define IMG_HEIGHT      576

#elif _PAL

#define VIDEO_FORMAT    PAL
#define VIDEO_RES       RES_PAL_CIF
#define FRM_WIDTH       352*2
#define FRM_HEIGHT     	288*2
#define IMG_WIDTH       352*2
#define IMG_HEIGHT      288*2

#endif

#define FRAME_BUF_SIZE (FRM_WIDTH*FRM_HEIGHT*2)  /* 4:2:2 format 16-bit/pixel */
#define BIT_BUF_SIZE    512000

#define NUM_SCOM_OBJS_IN         1
#define NUM_SCOM_OBJS_OUT        1

extern SCOM_Handle objSCOMInToProc[NUM_SCOM_OBJS_IN][2];
extern  SCOM_Handle objSCOMProcToOut[NUM_SCOM_OBJS_OUT][2];
extern  Ptr msgSCOMInToProc[NUM_SCOM_OBJS_IN];
extern  Ptr msgSCOMProcToOut[NUM_SCOM_OBJS_OUT];

extern int intHeap;
extern int extHeap;

extern void tskVideoInputInit();
extern void tskVideoOutputInit();
extern void tskProcessInit();


typedef struct ScomBufChannels {
    QUE_Elem queElem;                    // must be first field.
    void * bufChannel;
} ScomBufChannels;

#endif /*_APP_MAIN_H */
